options(repos = c(CRAN = "https://cran.r-project.org/"))
#creating an interactive plot with Plotly
library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
plot_ly(data = mtcars, x = ~mpg, y = ~hp, type = "scatter", mode = "markers")